home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  19.2 KB  |  600 lines

  1. /*  stdlib.h
  2.  
  3.     Definitions for common types, variables, and functions.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 9.0
  9.  *
  10.  *      Copyright (c) 1987, 1998 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14. /* $Revision:   9.6  $ */
  15.  
  16. #ifndef __STDLIB_H
  17. #define __STDLIB_H
  18. #define _INC_STDLIB  /* MSC Guard name */
  19.  
  20. #ifndef ___STDDEF_H
  21. #include <_stddef.h>
  22. #endif
  23.  
  24. #ifndef __SEARCH_H
  25. #include <search.h>  /* Factored out all the search functions to search.h */
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C"{
  30. #endif
  31.  
  32. /* Intrinsics must be prototyped outside of any namespace, so we list them here
  33.    before entering namespace std.
  34.  */
  35. int            _RTLENTRY __abs__(int);
  36. unsigned char  _RTLENTRY ___crotl__(unsigned char __value, int __count);
  37. unsigned char  _RTLENTRY ___crotr__(unsigned char __value, int __count);
  38. unsigned long  _RTLENTRY ___lrotl__(unsigned long __val, int __count);
  39. unsigned long  _RTLENTRY ___lrotr__(unsigned long __val, int __count);
  40. unsigned short _RTLENTRY ___rotl__ (unsigned short __value, int __count);
  41. unsigned short _RTLENTRY ___rotr__ (unsigned short __value, int __count);
  42.  
  43. #ifdef __cplusplus
  44. } // extern "C"
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48. namespace std {
  49. #endif /* __cplusplus */
  50.  
  51.  
  52. #if !defined(RC_INVOKED)
  53.  
  54. #if defined(__STDC__)
  55. #pragma warn -nak
  56. #endif
  57.  
  58. #pragma pack(push, 1)
  59.  
  60. #endif  /* !RC_INVOKED */
  61.  
  62. #ifndef _DIV_T
  63. #define _DIV_T
  64. typedef struct {
  65.         int     quot;
  66.         int     rem;
  67. } div_t;
  68. #endif
  69.  
  70. #ifndef _LDIV_T
  71. #define _LDIV_T
  72. typedef struct {
  73.         long    quot;
  74.         long    rem;
  75. } ldiv_t;
  76. #endif
  77.  
  78. #define MB_CUR_MAX 1
  79.  
  80. /* Maximum value returned by "rand" function
  81. */
  82. #define RAND_MAX  0x7FFFU
  83.  
  84. /* Maximum value returned by "_lrand" function (also used by random() macro)
  85. */
  86. #define LRAND_MAX 0x7FFFFFFFU
  87.  
  88. #define EXIT_SUCCESS 0
  89. #define EXIT_FAILURE 1
  90.  
  91. typedef void (_USERENTRY * atexit_t)(void);
  92.  
  93. /*
  94.   These 2 constants are defined in MS's stdlib.h.
  95. */
  96.  
  97. #define DOS_MODE    0  /* DOS 16-bit */
  98. #define OS2_MODE    1  /* OS/2 16-bit */
  99.  
  100.  
  101.  
  102. #ifdef __cplusplus
  103. extern "C" {
  104. #endif
  105.  
  106. void        _RTLENTRY _EXPFUNC abort(void);
  107.  
  108. #if !defined(__ABS_DEFINED)
  109. #define __ABS_DEFINED
  110.  
  111.  
  112. #ifdef __cplusplus
  113. inline int _RTLENTRY  abs(int __x) { return __abs__(__x); }
  114. #else
  115. int         _RTLENTRYF _EXPFUNC abs(int __x);
  116. #  define abs(x)   __abs__(x)
  117. #endif
  118.  
  119. #endif /* __ABS_DEFINED */
  120.  
  121.  
  122. int         _RTLENTRY   _EXPFUNC atexit(void (_USERENTRY * __func)(void));
  123. double      _RTLENTRY   _EXPFUNC atof(const char * __s);
  124. int         _RTLENTRYF  _EXPFUNC atoi(const char * __s);
  125. long        _RTLENTRYF  _EXPFUNC atol(const char * __s);
  126. void *      _RTLENTRY _EXPFUNC   calloc(_SIZE_T __nitems, _SIZE_T __size);
  127. div_t       _RTLENTRY _EXPFUNC   div(int __numer, int __denom);
  128. void        _RTLENTRY _EXPFUNC   exit(int __status);
  129. void        _RTLENTRY _EXPFUNC   free(void * __block);
  130. char *      _RTLENTRYF _EXPFUNC  getenv(const char * __name);
  131. long        _RTLENTRY _EXPFUNC   labs(long __x);
  132. ldiv_t      _RTLENTRY _EXPFUNC   ldiv(long __numer, long __denom);
  133. void *      _RTLENTRY _EXPFUNC   malloc(_SIZE_T __size);
  134. int         _RTLENTRY _EXPFUNC   mblen(const char * __s, _SIZE_T __n);
  135. _SIZE_T      _RTLENTRY _EXPFUNC   mbstowcs(wchar_t *__pwcs, const char * __s,
  136.                            _SIZE_T __n);
  137. int         _RTLENTRY _EXPFUNC   mbtowc(wchar_t *__pwc, const char * __s, _SIZE_T __n);
  138. int         _RTLENTRY _EXPFUNC   rand(void);
  139. void *      _RTLENTRY _EXPFUNC   realloc(void * __block, _SIZE_T __size);
  140. void        _RTLENTRY _EXPFUNC   srand(unsigned __seed);
  141. double      _RTLENTRY _EXPFUNC   strtod(const char * __s, char * *__endptr);
  142. long        _RTLENTRY _EXPFUNC   strtol(const char * __s, char * *__endptr,
  143.                            int __radix);
  144. long double _RTLENTRY _EXPFUNC   _strtold(const char * __s, char * *__endptr);
  145. unsigned long _RTLENTRY _EXPFUNC strtoul(const char * __s, char * *__endptr,
  146.                            int __radix);
  147. int         _RTLENTRY _EXPFUNC   system(const char * __command);
  148.  
  149. _SIZE_T      _RTLENTRY _EXPFUNC   wcstombs(char * __s, const wchar_t *__pwcs,_SIZE_T __n);
  150. int         _RTLENTRY _EXPFUNC   wctomb(char * __s, wchar_t __wc);
  151. double      _RTLENTRY _EXPFUNC   _wtof(const wchar_t * __s);
  152. int         _RTLENTRY _EXPFUNC   _wtoi(const wchar_t * __s);
  153. long        _RTLENTRY _EXPFUNC   _wtol(const wchar_t * __s);
  154. long double _RTLENTRY _EXPFUNC   _wtold(const wchar_t * __s);
  155. double      _RTLENTRY _EXPFUNC   wcstod(const wchar_t * __s, wchar_t * *__endptr);
  156. long        _RTLENTRY _EXPFUNC   wcstol(const wchar_t * __s, wchar_t * *__endptr, int __radix);
  157. long double _RTLENTRY _EXPFUNC   _wcstold(const wchar_t * __s, wchar_t * *__endptr);
  158. unsigned long _RTLENTRY _EXPFUNC wcstoul(const wchar_t * __s, wchar_t * *__endptr, int __radix);
  159. int         _RTLENTRY  _EXPFUNC  _wsystem(const wchar_t * __command);
  160. wchar_t *   _RTLENTRY  _EXPFUNC  _itow(int __value, wchar_t *__string, int __radix);
  161. wchar_t *   _RTLENTRY  _EXPFUNC  _ltow(long __value, wchar_t *__string, int __radix);
  162. wchar_t *   _RTLENTRY  _EXPFUNC  _ultow(unsigned long __value, wchar_t *__string, int __radix);
  163.  
  164. #if !defined(__STDC__)
  165. #if defined (_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS >= 64)
  166. __int64     _RTLENTRY   _EXPFUNC _atoi64(const char * __s);
  167. char *      _RTLENTRY   _EXPFUNC _i64toa(__int64 __value, char *__strP, int __radix);
  168. char *      _RTLENTRY   _EXPFUNC _ui64toa(unsigned __int64 __value, char *__strP, int __radix);
  169. __int64     _RTLENTRY   _EXPFUNC _wtoi64(const wchar_t * __s);
  170. wchar_t *   _RTLENTRY   _EXPFUNC _i64tow(__int64 __value, wchar_t *__strP, int __radix);
  171. wchar_t *   _RTLENTRY   _EXPFUNC _ui64tow(unsigned __int64 __value, wchar_t *__strP, int __radix);
  172. #endif
  173. char *      _RTLENTRY   _EXPFUNC ltoa(long __value, char * __string, int __radix);
  174. char *      _RTLENTRY   _EXPFUNC ecvt(double __value, int __ndig, int * __dec, int * __sign);
  175. char *      _RTLENTRY   _EXPFUNC fcvt(double __value, int __ndig, int * __dec, int * __sign);
  176. char *      _RTLENTRY   _EXPFUNC gcvt(double __value, int __ndec, char * __buf);
  177.  
  178. #endif /* __STDC__ */
  179.  
  180.  
  181. /* Variables */
  182.  
  183. #ifdef _MT
  184.  
  185. extern  int * _RTLENTRY _EXPFUNC __errno(void);
  186. extern  int * _RTLENTRY _EXPFUNC __doserrno(void);
  187. #define errno (*__errno())
  188. #define _doserrno (*__doserrno())
  189.  
  190. #else   /* MT */
  191.  
  192. extern  int   _RTLENTRY _EXPDATA errno;
  193. extern  int   _RTLENTRY _EXPDATA _doserrno;
  194.  
  195. #endif  /* MT */
  196.  
  197. #if !defined(__STDC__)
  198.  
  199. /* Values for _osmode */
  200.  
  201. #define _WIN_MODE    2  /* Windows 16- or 32-bit */
  202. #define _OS2_20_MODE 3  /* OS/2 32-bit */
  203. #define _DOSX32_MODE 4  /* DOS 32-bit */
  204.  
  205. #define environ  _environ
  206.  
  207. #endif /* __STDC__ */
  208.  
  209. extern  char          **_RTLENTRY _EXPDATA _environ;
  210. extern  wchar_t       **_RTLENTRY _EXPDATA _wenviron;
  211. extern  int             _RTLENTRY _EXPDATA _fileinfo;
  212. extern  int             _RTLENTRY          _fmode;
  213. extern  unsigned char   _RTLENTRY _EXPDATA _osmajor;
  214. extern  unsigned char   _RTLENTRY _EXPDATA _osminor;
  215. extern  unsigned char   _RTLENTRY _EXPDATA _osmode;
  216. extern  unsigned int    _RTLENTRY _EXPDATA _osversion;
  217. extern  int             _RTLENTRY _EXPDATA _cmdline_escapes;
  218.  
  219.  
  220. #if !defined(__STDC__)
  221. #define sys_nerr     _sys_nerr
  222. #define sys_errlist  _sys_errlist
  223. #endif
  224.  
  225. extern  char          * _RTLENTRY _EXPDATA _sys_errlist[];
  226. extern  int             _RTLENTRY _EXPDATA _sys_nerr;
  227.  
  228. #ifdef __cplusplus
  229. }
  230. #endif
  231.  
  232. #if !defined(__STDC__) && !defined(__CODEGUARD__)
  233. #ifdef __cplusplus
  234.    inline int _RTLENTRY atoi(const char *__s) { return (int)atol(__s); }
  235. #else
  236. #  define atoi(s)((int) atol(s))
  237. #endif
  238. #endif
  239.  
  240. /* Constants for MSC pathname functions */
  241.  
  242. #define _MAX_PATH       260
  243. #define _MAX_DRIVE      3
  244. #define _MAX_DIR        256
  245. #define _MAX_FNAME      256
  246. #define _MAX_EXT        256
  247.  
  248. #ifdef __cplusplus
  249. extern "C" {
  250. #endif
  251.  
  252. long double   _RTLENTRY  _EXPFUNC _atold(const char * __s);
  253.  
  254. unsigned char _RTLENTRY  _EXPFUNC _crotl(unsigned char __value, int __count);
  255. unsigned char _RTLENTRY  _EXPFUNC _crotr(unsigned char __value, int __count);
  256.  
  257. char *        _RTLENTRY  _EXPFUNC _ecvt(double __value, int __ndig, int * __dec,
  258.                                        int * __sign);
  259. void          _RTLENTRY  _EXPFUNC _exit(int __status);
  260. char *        _RTLENTRY  _EXPFUNC _fcvt(double __value, int __ndig, int * __dec,
  261.                                        int * __sign);
  262. char *        _RTLENTRYF _EXPFUNC _fullpath(char * __buf, const char * __path,
  263.                                             _SIZE_T __maxlen);
  264. char *        _RTLENTRY  _EXPFUNC _gcvt(double __value, int __ndec,
  265.                                        char * __buf);
  266. char *        _RTLENTRYF _EXPFUNC itoa(int __value, char * __string,
  267.                                        int __radix);
  268. long          _RTLENTRY  _EXPFUNC _lrand(void);
  269. unsigned long _RTLENTRY  _EXPFUNC _lrotl(unsigned long __val, int __count);
  270. unsigned long _RTLENTRY  _EXPFUNC _lrotr(unsigned long __val, int __count);
  271.  
  272. char *        _RTLENTRYF _EXPFUNC _ltoa(long __value, char * __string,
  273.                                        int __radix);
  274. void          _RTLENTRY  _EXPFUNC _makepath(char * __path,
  275.                                             const char * __drive,
  276.                                             const char * __dir,
  277.                                             const char * __name,
  278.                                             const char * __ext );
  279. int           _RTLENTRY  _EXPFUNC putenv(const char * __name);
  280.  
  281. unsigned short  _RTLENTRY _EXPFUNC _rotl(unsigned short __value, int __count);
  282. unsigned short  _RTLENTRY _EXPFUNC _rotr(unsigned short __value, int __count);
  283.  
  284. void            _RTLENTRY _EXPFUNC _searchenv(const char * __file,
  285.                                              const char * __varname,
  286.                                              char *__pathname);
  287. void            _RTLENTRY _EXPFUNC _searchstr(const char * __file,
  288.                                              const char * __ipath,
  289.                                              char *__pathname);
  290. void            _RTLENTRY _EXPFUNC _splitpath(const char * __path,
  291.                                              char * __drive,
  292.                                              char * __dir,
  293.                                              char * __name,
  294.                                              char * __ext );
  295. void            _RTLENTRY _EXPFUNC swab(char * __from, char * __to, int __nbytes);
  296. char *          _RTLENTRY _EXPFUNC ultoa(unsigned long __value, char * __string,
  297.                                         int __radix);
  298. void            _RTLENTRY _EXPFUNC perror(const char * __s);
  299.  
  300. void            _RTLENTRY _EXPFUNC _wperror(const wchar_t * __s);
  301. wchar_t *       _RTLENTRY _EXPFUNC _wfullpath(wchar_t * __buf,const wchar_t * __path,
  302.                                              _SIZE_T __maxlen);
  303. void            _RTLENTRY _EXPFUNC _wmakepath(wchar_t * __path,
  304.                                              const wchar_t * __drive,
  305.                                              const wchar_t * __dir,
  306.                                              const wchar_t * __name,
  307.                                              const wchar_t * __ext );
  308. void          _RTLENTRY  _EXPFUNC _wsplitpath(const wchar_t * __path,
  309.                                               wchar_t * __drive,
  310.                                               wchar_t * __dir,
  311.                                               wchar_t * __name,
  312.                                               wchar_t * __ext );
  313.  
  314. void          _RTLENTRY  _EXPFUNC _wsearchenv(const wchar_t * __file,
  315.                                              const wchar_t * __varname,
  316.                                              wchar_t *__pathname);
  317. void          _RTLENTRY  _EXPFUNC _wsearchstr(const wchar_t * __file,
  318.                                              const wchar_t * __ipath,
  319.                                              wchar_t *__pathname);
  320. wchar_t *     _RTLENTRY _EXPFUNC  _wgetenv(const wchar_t * __name);
  321. int           _RTLENTRY _EXPFUNC  _wputenv(const wchar_t * __name);
  322.  
  323. #ifdef __cplusplus
  324. }
  325. #endif
  326.  
  327. #if !defined(__STDC__)
  328.  
  329. #if defined(__cplusplus)
  330. inline int  _RTLENTRY random(int __num)
  331.                        { return __num ? (int)(_lrand()%(__num)) : 0; }
  332. #else /* __cplusplus */
  333. #define random(num) (num ? (int)(_lrand()%(num)) : 0)
  334. #endif  /* __cplusplus  */
  335.  
  336. #endif /* __STDC__ */
  337.  
  338. #if defined(__cplusplus)
  339. extern "C" long _RTLENTRY _EXPFUNC time(long _FAR *);
  340. #endif
  341.  
  342. #if !defined(__STDC__)
  343.  
  344. #if defined(__cplusplus)
  345.  
  346. /* Need prototype of time() for C++ randomize() */
  347. inline void _RTLENTRY randomize(void) { srand((unsigned) time(NULL)); }
  348.  
  349. #if defined(__MFC_COMPAT__)
  350. #if !defined( __MINMAX_DEFINED)
  351. #define __MINMAX_DEFINED
  352. #define max(a,b)    (((a) > (b)) ? (a) : (b))
  353. #define min(a,b)    (((a) < (b)) ? (a) : (b))
  354. #define __max       max
  355. #define __min       min
  356. #endif /*__MINMAX_DEFINED */
  357.  
  358. inline char * _RTLENTRY  _ecvt(double __value, int __ndig, int * __dec,
  359.                          int * __sign)
  360.                          { return ecvt (__value, __ndig, __dec, __sign); }
  361. inline char * _RTLENTRY  _fcvt(double __value, int __ndig, int * __dec,
  362.                          int * __sign)
  363.                          { return fcvt (__value, __ndig, __dec, __sign); }
  364. inline char * _RTLENTRY  _gcvt(double __value, int __ndec,
  365.                          char * __buf)
  366.                          { return gcvt(__value, __ndec, __buf); }
  367. inline char * _RTLENTRYF _itoa(int __value, char * __string,
  368.                          int __radix)
  369.                          { return itoa(__value, __string, __radix); }
  370. inline char * _RTLENTRYF _ltoa(long __value, char * __string,
  371.                          int __radix)
  372.                          { return ltoa(__value, __string, __radix); }
  373. inline char * _RTLENTRYF _ultoa(unsigned long __value, char * __string,
  374.                          int __radix)
  375.                          { return ultoa(__value, __string, __radix); }
  376. inline int    _RTLENTRY  _putenv(const char * __name) {return putenv(__name);}
  377. inline void   _RTLENTRY  _swab(char * __from, char * __to, int __nbytes)
  378.                          { swab (__from, __to, __nbytes); }
  379. #if !defined(__DLL__)
  380. #ifdef __cplusplus
  381. extern "C" {
  382. #endif
  383. extern  int           _RTLENTRY __argc;
  384. extern  char        **_RTLENTRY __argv;
  385. #ifdef  __cplusplus
  386. }
  387. #endif
  388. #endif  /* __DLL__ */
  389. #else   /* __MFC_COMPAT__ */
  390. #if !defined( __MINMAX_DEFINED) && defined(__cplusplus)
  391. #define __MINMAX_DEFINED
  392. template <class T> inline const T _FAR &min( const T _FAR &t1, const T _FAR &t2 )
  393. {
  394.     if  (t1 < t2)
  395.         return t1;
  396.     else
  397.         return t2;
  398. }
  399.  
  400. template <class T> inline const T _FAR &max( const T _FAR &t1, const T _FAR &t2 )
  401. {
  402.     if  (t1 > t2)
  403.         return t1;
  404.     else
  405.         return t2;
  406. }
  407. #endif
  408. #endif /* __MFC_COMPAT__ */
  409.  
  410. #else /* __cplusplus */
  411.  
  412. #define randomize() srand((unsigned)time(NULL))
  413. #define max(a,b)    (((a) > (b)) ? (a) : (b))
  414. #define min(a,b)    (((a) < (b)) ? (a) : (b))
  415. #endif /* __cplusplus */
  416.  
  417.  
  418. #define  MB_CUR_MAX              1
  419.  
  420. #endif /* __STDC__ */
  421.  
  422. #if defined(__MSC) && !defined(__MFC_COMPAT__)
  423. #define _itoa(__value, __string, __radix) itoa(__value, __string, __radix)
  424. #endif
  425.  
  426.  
  427. #if !defined(RC_INVOKED)
  428.  
  429. /* restore default packing */
  430. #pragma pack(pop)
  431.  
  432. #if defined(__STDC__)
  433. #pragma warn .nak
  434. #endif
  435.  
  436. #endif  /* !RC_INVOKED */
  437.  
  438. #ifdef __cplusplus
  439. } // std
  440. #endif /* __cplusplus */
  441.  
  442. #endif  /* __STDLIB_H */
  443.  
  444. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__STDLIB_H_USING_LIST)
  445. #define __STDLIB_H_USING_LIST
  446. #if !defined(__DLL__) && defined(__MFC_COMPAT__)
  447.      using std::__argc;
  448.      using std::__argv;
  449. #endif
  450. #ifdef _MT
  451.      using std::__doserrno;
  452.      using std::__errno;
  453. #else
  454.      using std::_doserrno;
  455.      using std::errno;
  456. #endif
  457.  
  458.      using std::_ecvt;
  459.      using std::_atold;
  460.      using std::_cmdline_escapes;
  461.      using std::_environ;
  462.      using std::_exit;
  463.      using std::_fileinfo;
  464.      using std::_fmode;
  465.      using std::_fullpath;
  466.      using std::_fcvt;
  467.      using std::_gcvt;
  468.  
  469. #if defined(__MFC_COMPAT__)
  470.      using std::_itoa;
  471.      using std::_ultoa;
  472.      using std::_putenv;
  473.      using std::_swab;
  474. #endif
  475.  
  476.      using std::_ultow;
  477.      using std::_itow;
  478.      using std::_lrand;
  479.      using std::_ltoa;
  480.      using std::_ltow;
  481.  
  482. #if !defined(__STDC__) && defined (_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS >= 64)
  483.      using std::_atoi64;
  484.      using std::_i64toa;
  485.      using std::_i64tow;
  486.      using std::_ui64toa;
  487.      using std::_ui64tow;
  488.      using std::_wtoi64;
  489. #endif
  490.  
  491.      using std::_makepath;
  492.      using std::_osmajor;
  493.      using std::_osminor;
  494.      using std::_osmode;
  495.      using std::_osversion;
  496.      using std::_searchenv;
  497.      using std::_searchstr;
  498.      using std::_splitpath;
  499.      using std::_strtold;
  500.      using std::_sys_errlist;
  501.      using std::_sys_nerr;
  502.      using std::_wcstold;
  503.      using std::_wenviron;
  504.      using std::_wfullpath;
  505.      using std::_wgetenv;
  506.      using std::_wmakepath;
  507.      using std::_wperror;
  508.      using std::_wputenv;
  509.      using std::_wsearchenv;
  510.      using std::_wsearchstr;
  511.      using std::_wsplitpath;
  512.      using std::_wsystem;
  513.      using std::_wtof;
  514.      using std::_wtoi;
  515.      using std::_wtol;
  516.      using std::_wtold;
  517.      using std::abort;
  518.      using std::atexit;
  519.      using std::atexit_t;
  520.      using std::atof;
  521.      using std::atoi;
  522.      using std::atol;
  523.      using std::calloc;
  524.      using std::div;
  525.      using std::div_t;
  526.      using std::exit;
  527.      using std::free;
  528.      using std::getenv;
  529.      using std::itoa;
  530.      using std::labs;
  531.      using std::ldiv;
  532.      using std::ldiv_t;
  533.      using std::malloc;
  534.  
  535. #if !defined(__STDC__)
  536.      using std::ecvt;
  537.      using std::fcvt;
  538.      using std::gcvt;
  539.      using std::ltoa;
  540.      using std::random;
  541.      using std::randomize;
  542. #endif
  543.  
  544. #if !defined(__MFC_COMPAT__) && !defined(__STDC__)
  545.      using std::min;
  546.      using std::max;
  547. #endif
  548.      using std::mblen;
  549.      using std::mbstowcs;
  550.      using std::mbtowc;
  551.      using std::perror;
  552.      using std::putenv;
  553.      using std::rand;
  554.      using std::realloc;
  555.      using std::srand;
  556.      using std::strtod;
  557.      using std::strtol;
  558.      using std::strtoul;
  559.      using std::swab;
  560.      using std::system;
  561.      using std::time;
  562.      using std::ultoa;
  563.      using std::wcstod;
  564.      using std::wcstol;
  565.      using std::wcstombs;
  566.      using std::wcstoul;
  567.      using std::wctomb;
  568.  
  569. /*
  570.    Handle intrinsics specially.  If intrinsics are on, the compiler creates
  571.    a macro of the normal function mapping to the __ intrinsic version, ie:
  572.      #define strcpy __strcpy__
  573.    Thus, we can test the normal name as a macro to see if it's defined, and
  574.    only preform a using statement if it's not an intrinsic
  575. */
  576.  
  577. #    ifndef abs
  578.        using std::abs;
  579. #    endif // ifndef abs
  580. #    ifndef _crotl
  581.        using std::_crotl;
  582. #    endif // ifndef _crotl
  583. #    ifndef _lrotl
  584.        using std::_lrotl;
  585. #    endif // ifndef _lrotl
  586. #    ifndef _lrotr
  587.        using std::_lrotr;
  588. #    endif // ifndef _lrotr
  589. #    ifndef _crotr
  590.        using std::_crotr;
  591. #    endif // ifndef _crotr
  592. #    ifndef _rotl
  593.        using std::_rotl;
  594. #    endif // ifndef _rotl
  595. #    ifndef _rotr
  596.        using std::_rotr;
  597. #    endif // ifndef _rotr
  598.  
  599. #endif /* __USING_CNAME__ */
  600.